package com.superb.common.database.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * @Author: ajie
 * @CreateTime: 2024-05-07 10:36
 */
@Data
public class BaseEntity implements Serializable {

    @TableId(type = IdType.ASSIGN_UUID)
    @Schema(description = "业务主键", hidden = true)
    private String id;

    @Schema(description = "创建时间", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @Schema(description = "创建人", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private String createBy;

    @TableField(exist = false)
    @Schema(description = "创建人")
    private String createName;

    @Schema(description = "租户id", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private String tenantId;

    @Schema(description = "部门id", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private String organId;

    @TableField(exist = false)
    @Schema(description = "部门名称")
    private String organName;

    @Schema(title = "删除标识", description = "0否；1是", hidden = true)
    @TableField(fill = FieldFill.INSERT)
    private Integer del;

    @Schema(description = "备注")
    private String remarks;

}
